package com.training.api.service;

import com.training.api.repository.UserRepository;
import com.training.bean.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    private UserRepository repository;

    @Autowired
    public UserService(UserRepository repository) {
        this.repository = repository;
    }

    public User findUser(String phone) {
        return repository.findUserByPhone(phone);
    }

}